<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
</head>

<body>
    <style>
        /* 自定义样式 */
        .layui-layout-header {
            background-color: #393D49;
        }

        .layui-header .layui-nav-bar {
            background-color: transparent;
        }

        .layui-nav .layui-nav-item a {
            color: #fff;
        }

        .layui-carousel {
            margin-top: 20px;
            /* border: 1px solid red; */
        }

        .layui-row {
            margin-top: 20px;
        }

        .layui-col-md3,
        .layui-col-xs6 {
            padding: 0 10px;
        }

        .playlist-item {
            text-align: center;
        }

        .playlist-item img {
            width: 100%;
            height: auto;
        }

        .playlist-item .playlist-info {
            margin-top: 10px;
            display: flex;
            justify-content: space-between;
            padding: 0 10px;
        }

        .playlist-item .playlist-info p {
            margin: 0;
        }

        .playlist-item .playlist-info .play-count {
            color: #999;
            font-size: 12px;
        }

        .centered-nav {
            display: flex;
            justify-content: center;
            margin-top: 20px;
        }

        .centered-nav .layui-nav-item {
            margin: 0 15px;
        }

        @media screen and (max-width: 768px) {
            .layui-header .layui-nav {
                display: none;
            }

            .mobile-nav {
                display: flex;
                justify-content: space-around;
                position: fixed;
                bottom: 0;
                left: 0;
                width: 100%;
                background-color: #393D49;
            }

            .mobile-nav .layui-nav-item a {
                color: #fff;
            }

            .layui-header {
                text-align: center;
                background-color: transparent;
            }

            .layui-logo img {
                margin: 0 auto;
                display: block;
            }
    </style>

    <body>

        <!-- 顶部导航栏 -->
        <div class="layui-layout layui-layout-header">
            <div class="layui-header">
                <div class="layui-container">
                    <div class="layui-logo"><img src="./image/logo(1).png" alt="音阙诗听" width="195" height="67"></div>
                    <ul class="layui-nav layui-layout-right">
                        <li class="layui-nav-item"><a href="">推荐</a></li>
                        <li class="layui-nav-item"><a href="">排行榜</a></li>
                        <li class="layui-nav-item"><a href="">歌单</a></li>
                        <li class="layui-nav-item"><a href="">歌手</a></li>
                        <li class="layui-nav-item"><a href="">专辑</a></li>
                    </ul>
                </div>
            </div>
        </div>


        <!-- 轮播图 -->
        <div class="layui-carousel" id="carousel">
            <div carousel-item>
                <div><img src="./image/1.jpeg" alt="轮播图1"></div>
                <div><img src="./image/2.jpeg" alt="轮播图2"></div>
                <div><img src="./image/3.jpeg" alt="轮播图3"></div>
                <div><img src="./image/4.jpeg" alt="轮播图4"></div>
            </div>
        </div>


        <!-- 居中导航栏 -->
        <div class="centered-nav layui-container">
            <ul class="layui-nav">
                <li class="layui-nav-item"><a href="">推荐</a></li>
                <li class="layui-nav-item"><a href="">歌单</a></li>
                <li class="layui-nav-item"><a href="">个人信息</a></li>
            </ul>
        </div>

        <!-- 推荐歌单 -->
        <div class="layui-container">
            <div class="layui-row">
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/1.jpeg" alt="歌单1">
                        <div class="playlist-info">
                            <p>效率加速器</p>
                            <p class="play-count">123万</p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/2.jpeg" alt="歌单2">
                        <div class="playlist-info">
                            <p>百万收藏</p>
                            <p class="play-count">456万</p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/3.jpeg" alt="歌单2">
                        <div class="playlist-info">
                            <p>轻音乐</p>
                            <p class="play-count">456万</p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/4.jpeg" alt="歌单2">
                        <div class="playlist-info">
                            <p>高燃励志</p>
                            <p class="play-count">456万</p>
                        </div>
                    </div>
                </div>


            </div>
        </div>

        <!-- 热门歌曲 -->
        <div class="layui-container">
            <div class="layui-row">
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/1.jpeg" alt="歌曲1">
                        <div class="playlist-info">
                            <p>起风了</p>
                            <p class="play-count">78万</p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/2.jpeg" alt="歌曲2">
                        <div class="playlist-info">
                            <p>大鱼</p>
                            <p class="play-count">56万</p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/3.jpeg" alt="歌曲2">
                        <div class="playlist-info">
                            <p>和光同尘</p>
                            <p class="play-count">56万</p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 layui-col-xs6">
                    <div class="playlist-item">
                        <img src="./image/4.jpeg" alt="歌曲2">
                        <div class="playlist-info">
                            <p>一路生花</p>
                            <p class="play-count">56万</p>
                        </div>
                    </div>
                </div>

            </div>
        </div>

        <!-- 手机端底部导航 -->
        <div class="mobile-nav layui-hide-md">
            <ul class="layui-nav">
                <li class="layui-nav-item"><a href="">推荐</a></li>
                <li class="layui-nav-item"><a href="">歌单</a></li>
                <li class="layui-nav-item"><a href="">我的</a></li>
            </ul>
        </div>

        <script src="./layui/layui.js"></script>
        <script>
            // 使用 layui 的轮播图组件
            layui.use('carousel', function () {
                var carousel = layui.carousel;
                //建造实例
                carousel.render({
                    elem: '#carousel',
                    width: '100%', //设置容器宽度
                    arrow: 'hover', //始终显示箭头
                    interval: '3000'
                });
            });

        </script>

    </body>

</html>